package com.mxpio.erp.common.jpa.model;

import com.mxpioframework.jpa.BaseEntity;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.MappedSuperclass;

@Data
@MappedSuperclass
@EqualsAndHashCode(callSuper=false)
@IdClass(OrderLineKey.class)
public class OrderLine extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/*@EmbeddedId
	private BizOrderLineKey id;*/

	@Column(name = "LINE_NO_", updatable = false)
	@ApiModelProperty(value = "行号")
	@Id
	private String lineNo;

	@Column(name = "BIZ_NO_", updatable = false)
	@ApiModelProperty(value = "业务单号")
	@Id
	private String bizNo;

	@Column(name = "CLOSE_STATUS_")
	@ApiModelProperty(value = "关闭状态")
	@Dict(dicCode="ERP_COMMON_CLOSE_STATUS")
	private String closeStatus;

	@Column(name = "SORT_")
	@ApiModelProperty(value = "顺序号")
	private String sort;
	
	@Column(name = "ITEM_CODE_")
	@ApiModelProperty(value = "物料代码")
	private String itemCode;
	
	@Column(name = "ITEM_NAME_")
	@ApiModelProperty(value = "物料名称")
	private String itemName ;

	@Column(name = "ITEM_SPEC_")
	@ApiModelProperty(value = "规格型号")
	private String itemSpec;
	
	@Column(name = "QUANTITY_")
	@ApiModelProperty(value = "数量")
	private BigDecimal quantity;
	
	@Column(name = "LOT_NO_")
	@ApiModelProperty(value = "批次号")
	private String lotNo;
	
	@Column(name = "UNIT_CODE_")
    @ApiModelProperty(value = "单位编号")
    private String unitCode;

}
